<?php      
    class Img_manipulation extends Controller {

        function Img_manipulation() {
            parent::Controller();
            $this->load->library('upload');
            $this->load->library('image_lib'); 
            $this->load->helper('image'); 
        }

        function index() {
            show_404();
        } 

        function resize($path=null,$file=null,$width=0,$height=0){

            if($path==null)$path = $_POST['path'];
            if($file==null)$file = $_POST['file']; 
            if($width==null)$width = $_POST['width']; 
            if($height==null)$height = $_POST['height']; 
            
            $new_image_name = image_resize($path.$file,$width,$height);
            
            
            echo json_encode(array('sucess'=>'true','new_image_name'=>$new_image_name));
        }

        function crop($path,$width,$height){

        }

        function create_simple($path,$width,$height){
            $config = array();
            $config['upload_path'] =  "";
        }

        function do_upload()
        {
        }     

    }
?>